{
 Pashkevich_Ivan
 19.09.2012
 OD solver
}
program OD;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  a, b, c, i, j:integer;

begin
  readln(a, b, c);
  if (a>=b) and (a>=c) then
  begin
    for i:=1 to a do
    begin
      if (a mod i=0) and (b mod i=0) and (c mod i=0) then
        write(i, ' ');
    end;
  end;
  if (c>=b) and (c>=a) then
  begin
    for i:=1 to b do
    begin
      if (a mod i=0) and (b mod i=0) and (c mod i=0) then
        write(i, ' ');
    end;
  end;
  if (b>=a) and (b>=c) then
  begin
    for i:=1 to c do
    begin
      if (a mod i=0) and (b mod i=0) and (c mod i=0) then
        write(i, ' ');
    end;
  end;
  readln;
end.
